<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<?php
	$key = $_POST["key"];
	
	$sql = "SELECT * FROM dt  WHERE tendt LIKE '%$key%'";
	
	$result = DataProvider::ExecuteQuery($sql);
	$dem=0;
	while ($row = mysql_fetch_array($result))
	{
		if ($key=="")
		{
			echo "<font style='font-size: 25px;'>Xin mời nhập tên điện thoại cần tìm!</font>";
			exit();
		}
		$dem++;
		?>
		<div class="boderDT">
	<div>
    	<a href="index.php?act=4&id=<?php echo $row["madt"]; ?>">
    		<img src="<?php echo $row["hinh"]; ?>" width="80" height="120" />
        </a>
    </div>
    <div>
    	<a href="index.php?act=4&id=<?php echo $row["madt"]; ?>">
    	<?php echo $row["tendt"]; ?></a>
    </div>
    <div>
    	<font color="#FF0000">Giá: <?php echo number_format ($row["gia"],0); ?>vnd</font>
    </div>
</div>
		<?php 
	}
	if ($dem == 0) echo "<font style='font-size: 25px;'>Không tìm thấy kết quả cho từ khóa <b>".$key."</b></font>";
?>
</body>
